<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // promise.all ===============================
        // const a = new Promise((resolve,reject) => {
        //   resolve(10)
        // })

        // const b = new Promise((resolve,reject) => {
        //   resolve(20)
        // })

        // const cc = Promise.all([a, b])
        // cc.then(res => {
        //   console.log(res)
        // }).catch(err => {
        //   console.log(err)
        // })
        

        // promise.race()=============================
        // const a = new Promise((resolve,reject) => {
        //   setTimeout(() => {
        //     resolve(10)
        //   })
        // })

        // const b = new Promise((resolve,reject) => {
        //   resolve(20)
        // })
        // Promise.race([a, b]).then(res => {
        //   console.log(res)
        // })


        // promise.allSettled=========================
        // const a = new Promise((resolve,reject) => {
        //   reject(10)
        // })

        // const b = new Promise((resolve,reject) => {
        //   resolve(20)
        // })

        // Promise.allSettled([a, b]).then(res => {
        //   console.log(res);
        // })
        
    </script>
</body>
</html>